chase (someone's) tail

Translations
courir après sa queue
Definitions
To pursue someone or something in a frantic or futile manner, often implying that the effort is unproductive or that the target is elusive.